This invention relates to rendering of graphics objects in a computer graphics application.
A page in an electronic document can include various types of graphics objects, such as text, line arts, and images. Electronic documents can generally be viewed, created, and edited by a user on a computer using a computer graphics application. Most computer graphics applications can also be used to produce (directly or indirectly) printed output defined by the electronic document. When a user wishes to create a printed copy of the electronic document, the high-level description of each document page must be converted into a two-dimensional array of colored dots, also referred to as pixels, which can be directly printed by the printing device. This conversion process is commonly known as rendering. Examples of computer graphics applications include the Adobe® Illustrator® and Adobe® Photoshop® applications, both available from Adobe Systems Incorporated of San Jose, Calif.
A given page of an electronic document can include objects that are to some degree transparent, such that objects that are placed behind the transparent objects can be seen through the transparent objects. Since Postscript® printers have no notion of transparent objects, if one or more pages of an electronic document contain a combination of transparent and opaque graphics objects, the graphics objects must typically be broken up into non-intersecting opaque components, which can be printed on the printing device. The process in which the opaque components are created is known as flattening. For a number of reasons, flattening can be prohibitively expensive in terms of memory, even for transparent objects with a relatively simple shape.
Graphics objects with a simple shape can intersect one another in complex ways and generate a large number of opaque components. During the printing process, an artwork tree is typically created, which represents all of the objects to be printed on a single page. Each leaf in the artwork tree represents an individual object, and each non-leaf node in the artwork tree represents a transparency group. Since opaque components are not necessarily generated in the order in which they must be printed, the entire artwork tree (and the opaque components corresponding to the objects in the artwork tree) must be kept in the main memory of the printer throughout the rendering process. Optionally, the artwork tree could be saved to a hard disk or other non-volatile storage medium, but retrieving the information from this memory could make the time for printing the document page prohibitively long.
Furthermore, flatteners typically require that object boundaries be represented as polygons (that this, a sequence of straight lines) for efficient computation of object intersections. However, the polygonal approximation of objects having even moderately complex boundaries typically requires a large number of line segments, where each line segment is represented by at least four numbers describing the start and end coordinates for the straight line segment. Such polygonal representations of the boundaries of all objects in the artwork tree must also be kept in the memory of the printer. For complex curves, there may not be enough available memory space to keep all the polygonal representations in the memory of the printer. In addition, printers usually have a higher resolution than display devices, so polygonal representations of curves must be more precise to achieve a good printing quality, requiring an even larger number of polygons and raising the memory requirements of the printers further.
Last but not least, PostScript printers typically use different color schemes for rasterized images and graphic objects. Consequently, even if parts of the document page are rasterized in order to bypass the flattener and address the memory problems described above, the resulting output from the printer is often unsatisfactory.